package cn.com.ylpw.web;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;

import cn.com.ylpw.spring.SpringContextHolder;

@Configuration
@ComponentScan
@EnableAutoConfiguration
@SpringBootApplication
@ImportResource(value = { "classpath:conf/application-content.xml","classpath:conf/springMVC.xml","classpath:conf/mybatis.xml" })
public class Application extends SpringBootServletInitializer {
	
	

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(Application.class);
	}
	public static void main(String[] args) {
		SpringContextHolder.applicationContext = SpringApplication.run(Application.class, "org.springframework.web.context.ContextLoaderListener");
	}
	
}